using System.Collections.Generic;
using System.Drawing;
using System.Linq;

namespace DataAccessLayer
{
    /// <summary>
    /// Contains extension functions
    /// </summary>
    public static class Extensions
    {
        public static void AddRange(this List<Rectangle> rects, List<EditorRect> serializableRects)
        {
            rects.AddRange(serializableRects.Select(serializableRect => (Rectangle) serializableRect));
        }

        public static void AddRange(this List<EditorRect> serializableRects, List<Rectangle> rects)
        {
            serializableRects.AddRange(rects.Select(rect => (EditorRect)rect));
        }
    }
}